//2.
#include<stdio.h>

int main()
{
	float ele,charge;
	
	printf("请输入用电量(千瓦)：");
	scanf("%f",&ele);
	
	if(ele <= 50)
		charge = ele * 0.538;
	else if(ele <= 200)
		charge = (ele * 0.538) + (ele - 50) * 0.03;
	else
		charge = (ele * 0.538) + (ele - 200) * 0.1 + (200 - 50) * 0.03;
	
  	printf("用电量%f千瓦的电费为%f元\n",ele,charge);
	return 0;
}

